import request from "@/utils/request";

export const selectListApi = () => {
  return request({
    url: "/subject/tree",
    method: "get",
  });
};
// 获取目录信息

export const getdirectoryListApi = (params) => {
  return request({
    url: "/subject/directory",
    method: "get",
    params,
  });
};
// 创建目录
export const adddirectoryApi = (data) => {
  return request({
    url: "/subject/directory",
    method: "post",
    data,
  });
};
// 回显
export const showdirectoryApi = (params) => {
  return request({
    url: "/subject/directory/" + params,
    method: "get",
    
  });
};
// 修改
export const editdirectoryApi = (data) => {
  return request({
    url: "/subject/directory/" + data.id,
    method: "put",
    data,
  });
};
// 删除
export const deletedirectoryApi = (id) => {
  return request({
    url: "/subject/directory/" + id,
    method: "delete",
  });
};
